package com.example.dao.demo;

import com.example.dao.UserDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author WenyiLuo
 * @Date 22/2/17 19:44
 **/

public class UserDaoDemo {
    public static void main(String[] args) {
        ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserDao userDao = (UserDao) app.getBean("userDao");
        userDao.save();
    }
}

//     Spring的开发步骤
//        1.导入坐标
//        2.创建Bean
//        3.创建applicationContext.xml
//        4.在配置文件中进行配置
//        5.创建ApplicationContext对象getBean
